#define  _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
using namespace std;


template <class T>
int add(T x,T y) {
	return x + y;
}
template <class Q>
void exchange(Q& x,Q& y) {
	Q tmp = x;
	x = y;
	y = tmp;
}
int main() {
	int a = 2;
	int b = 4;
	cout << add(a, b) << endl;
	exchange(a, b);
	cout << a << endl;
	cout << b << endl;
	return 0;
}